﻿using SCM.Common;
using SqlSugar;
using System;

namespace SCM.Model.DBEntity
{
    /// <summary>
    /// 测试报告表
    /// </summary>
    [SugarTable("T_TestReport")]
    public class T_TestReport:EntityBase
    {
        /// <summary>
        /// 测试报告ID
        /// </summary>
        public string ID { get; set; }

        /// <summary>
        /// 所属企业ID
        /// </summary>
        public string CompanyID { get; set; }

        /// <summary>
        /// 第三方机构名称
        /// </summary>
        public string OrgName { get; set; }

        /// <summary>
        /// 测试报告编号
        /// </summary>
        public string TestReportNo { get; set; }

        /// <summary>
        /// 测试报告名称
        /// </summary>
        public string TestName { get; set; }

        /// <summary>
        /// 测试报告结果
        /// </summary>
        public TestResultEnum TestResult { get; set; }

        /// <summary>
        /// 测试报告结果
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string TestResultStr { get { return EnumHelper.GetDescription(TestResult); }}

        /// <summary>
        /// 测试日期
        /// </summary>
        public DateTime TaskDate { get; set; }

        /// <summary>
        /// 测试日期
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string TaskDateStr { get { return TaskDate.ToString("yyyy-MM-dd HH:mm:ss"); }}

        /// <summary>
        /// 有效截止日期
        /// </summary>
        public DateTime ExpiryDate { get; set; }

        /// <summary>
        /// 有效截止日期
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string ExpiryDateStr { get { return ExpiryDate.ToString("yyyy-MM-dd HH:mm:ss"); }}

        /// <summary>
        /// 附件
        /// </summary>
        public string Attachment { get; set; }

        /// <summary>
        /// 任务审核状态
        /// </summary>
        public TaskReportStatusEnum TaskReportStatus { get; set; }

        /// <summary>
        /// 任务审核状态
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string TaskReportStatusStr { get { return EnumHelper.GetDescription(TaskReportStatus); }}

        /// <summary>
        /// RoHS声明状态
        /// </summary>
        public RoHSStatmentStatusEnum RoHSStatmentStatus { get; set; }

        /// <summary>
        /// RoHS声明状态
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public string RoHSStatmentStatusStr { get { return EnumHelper.GetDescription(RoHSStatmentStatus); }}
    }
}